package cn.cmdr.mapper;

import cn.cmdr.pojo.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PermissionMapper extends BaseMapper<Permission> {
    @Select("SELECT perm_code FROM cmdr_permission WHERE id in (SELECT perm_id FROM cmdr_role_permission where role_id = #{roleId})")
    List<String> getPerCodes(Integer roleId);
}
